import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/home'
import preview from '@/views/preview'

Vue.use(Router)

const routes = [
	{ path: '/', name: 'home', component: home},
	{ path: '/preview', name: 'home', component: preview},
];
const router = new Router({
	//配置路由和组件之间的应用关系
	routes,
	mode: 'hash',
	//对应的路由匹配成功，则会给当前元素设置router-link-active的class
	linkActiveClass: 'active',
})
export default router;